package com.city.domain.pub;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/**
 * @deprecation:基本用户信息表
 * @dmail: 398521613@qq.com
 * @author: L-H
 * @date: 2018-07-18 13:14
 */
@Entity
@Table(name = "pub_user", schema = "city", catalog = "")
public class PubUser implements Serializable {

    private static final long serialVersionUID = 1L;

    private String redisKey;//redis中的key

    private int id;//主键
    private int householdId;//家庭id
    private int townId;//镇id
    private int villageId;//村id
    private String name;//姓名
    private String idCard;//身份证号码
    private int age;//年龄
    private String born;
    private String hrResiter;//籍贯
    private String nohRegister; // 户籍性质
    private String bornAddress;  //出生地
    private String marriage; //婚姻状况
    private String education;  //学历
    private int income; // 收入
    private String school;  //毕业院校
    private String tellphone;  //手机号
    private Integer sex;//性别
    private Integer nation;//民族
    private Integer relation;//关系
    private Integer isLdl;//是否有劳动力
    private Integer isCj;//是否残疾
    private Integer healthStatus;//健康状况：1健康，2长期慢性病，3患大病
    private Integer isDb;//是否低保
    private Integer isBx;//是否保险
    private Integer isWb;//是否五保
    private String work;//就业情况
    private String industry;//工作行业
    private int updateTime;
    private String major;//所学专业
    private String email;//电子邮箱
    private String qq;  //qq
    private String weixin;//微信
    private String livein;  //家庭住址
    private String politicalOutlook;
    private Integer authLevel;

    public Integer getAuthLevel() {
        return authLevel;
    }

    public void setAuthLevel(Integer authLevel) {
        this.authLevel = authLevel;
    }

    public String getRedisKey() {
        return redisKey;
    }

    public void setRedisKey(String keyStr) {
        this.redisKey = "pub_user_"+keyStr;
    }

    public String getBorn() {
        return born;
    }

    public void setBorn(String born) {
        this.born = born;
    }

    public String getHrResiter() {
        return hrResiter;
    }

    public void setHrResiter(String hrResiter) {
        this.hrResiter = hrResiter;
    }

    public String getBornAddress() {
        return bornAddress;
    }

    public void setBornAddress(String bornAddress) {
        this.bornAddress = bornAddress;
    }

    public String getMarriage() {
        return marriage;
    }

    public void setMarriage(String marriage) {
        this.marriage = marriage;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getTellphone() {
        return tellphone;
    }

    public void setTellphone(String tellphone) {
        this.tellphone = tellphone;
    }

    public String getLivein() {
        return livein;
    }

    public void setLivein(String livein) {
        this.livein = livein;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }

    public String getWeixin() {
        return weixin;
    }

    public void setWeixin(String weixin) {
        this.weixin = weixin;
    }

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "household_id")
    public int getHouseholdId() {
        return householdId;
    }

    public void setHouseholdId(int householdId) {
        this.householdId = householdId;
    }

    @Basic
    @Column(name = "town_id")
    public int getTownId() {
        return townId;
    }

    public void setTownId(int townId) {
        this.townId = townId;
    }

    @Basic
    @Column(name = "village_id")
    public int getVillageId() {
        return villageId;
    }

    public void setVillageId(int villageId) {
        this.villageId = villageId;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "id_card")
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    @Basic
    @Column(name = "age")
    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }



    @Basic
    @Column(name = "relation")
    public Integer getRelation() {
        return relation;
    }

    public void setRelation(Integer relation) {
        this.relation = relation;
    }

    @Basic
    @Column(name = "is_ldl")
    public Integer getIsLdl() {
        return isLdl;
    }

    public void setIsLdl(Integer isLdl) {
        this.isLdl = isLdl;
    }

    @Basic
    @Column(name = "is_cj")
    public Integer getIsCj() {
        return isCj;
    }

    public void setIsCj(Integer isCj) {
        this.isCj = isCj;
    }

    @Basic
    @Column(name = "health_status")
    public Integer getHealthStatus() {
        return healthStatus;
    }

    public void setHealthStatus(Integer healthStatus) {
        this.healthStatus = healthStatus;
    }

    @Basic
    @Column(name = "is_db")
    public Integer getIsDb() {
        return isDb;
    }

    public void setIsDb(Integer isDb) {
        this.isDb = isDb;
    }

    @Basic
    @Column(name = "is_bx")
    public Integer getIsBx() {
        return isBx;
    }

    public void setIsBx(Integer isBx) {
        this.isBx = isBx;
    }

    @Basic
    @Column(name = "is_wb")
    public Integer getIsWb() {
        return isWb;
    }

    public void setIsWb(Integer isWb) {
        this.isWb = isWb;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public Integer getNation() {
        return nation;
    }

    public void setNation(Integer nation) {
        this.nation = nation;
    }

    public String getWork() {
        return work;
    }

    public void setWork(String work) {
        this.work = work;
    }

    public String getIndustry() {
        return industry;
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    @Basic
    @Column(name = "update_time")
    public int getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(int updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "political_outlook")
    public String getPoliticalOutlook() {
        return politicalOutlook;
    }

    public void setPoliticalOutlook(String politicalOutlook) {
        this.politicalOutlook = politicalOutlook;
    }

    @Basic
    @Column(name = "noh_register")
    public String getNohRegister() {
        return nohRegister;
    }

    public void setNohRegister(String nohRegister) {
        this.nohRegister = nohRegister;
    }

    @Basic
    @Column(name = "income")
    public int getIncome() {
        return income;
    }

    public void setIncome(int income) {
        this.income = income;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PubUser pubUser = (PubUser) o;
        return id == pubUser.id &&
                householdId == pubUser.householdId &&
                townId == pubUser.townId &&
                villageId == pubUser.villageId &&
                age == pubUser.age &&
                income == pubUser.income &&
                relation == pubUser.relation &&
                isLdl == pubUser.isLdl &&
                isCj == pubUser.isCj &&
                healthStatus == pubUser.healthStatus &&
                isDb == pubUser.isDb &&
                isBx == pubUser.isBx &&
                isWb == pubUser.isWb &&
                industry == pubUser.industry &&
                updateTime == pubUser.updateTime &&
                Objects.equals(redisKey, pubUser.redisKey) &&
                Objects.equals(name, pubUser.name) &&
                Objects.equals(idCard, pubUser.idCard) &&
                Objects.equals(born, pubUser.born) &&
                Objects.equals(hrResiter, pubUser.hrResiter) &&
                Objects.equals(nohRegister, pubUser.nohRegister) &&
                Objects.equals(bornAddress, pubUser.bornAddress) &&
                Objects.equals(marriage, pubUser.marriage) &&
                Objects.equals(education, pubUser.education) &&
                Objects.equals(school, pubUser.school) &&
                Objects.equals(tellphone, pubUser.tellphone) &&
                Objects.equals(politicalOutlook, pubUser.politicalOutlook) &&
                Objects.equals(sex, pubUser.sex) &&
                Objects.equals(nation, pubUser.nation) &&
                Objects.equals(work, pubUser.work) &&
                Objects.equals(major, pubUser.major) &&
                Objects.equals(email, pubUser.email) &&
                Objects.equals(qq, pubUser.qq) &&
                Objects.equals(weixin, pubUser.weixin) &&
                Objects.equals(livein, pubUser.livein);
    }

    @Override
    public int hashCode() {

        return Objects.hash(redisKey, id, householdId, townId, villageId, name, idCard, age, born, hrResiter, nohRegister, bornAddress, marriage, education, income, school, tellphone, politicalOutlook, sex, nation, relation, isLdl, isCj, healthStatus, isDb, isBx, isWb, work, industry, updateTime, major, email, qq, weixin, livein);
    }

    @Override
    public String toString() {
        return "PubUser{" +
                "redisKey='" + redisKey + '\'' +
                ", id=" + id +
                ", householdId=" + householdId +
                ", townId=" + townId +
                ", villageId=" + villageId +
                ", name='" + name + '\'' +
                ", idCard='" + idCard + '\'' +
                ", age=" + age +
                ", born='" + born + '\'' +
                ", hrResiter='" + hrResiter + '\'' +
                ", nohRegister='" + nohRegister + '\'' +
                ", bornAddress='" + bornAddress + '\'' +
                ", marriage='" + marriage + '\'' +
                ", education='" + education + '\'' +
                ", income=" + income +
                ", school='" + school + '\'' +
                ", tellphone='" + tellphone + '\'' +
                ", sex=" + sex +
                ", nation=" + nation +
                ", relation=" + relation +
                ", isLdl=" + isLdl +
                ", isCj=" + isCj +
                ", healthStatus=" + healthStatus +
                ", isDb=" + isDb +
                ", isBx=" + isBx +
                ", isWb=" + isWb +
                ", work='" + work + '\'' +
                ", industry='" + industry + '\'' +
                ", updateTime=" + updateTime +
                ", major='" + major + '\'' +
                ", email='" + email + '\'' +
                ", qq='" + qq + '\'' +
                ", weixin='" + weixin + '\'' +
                ", livein='" + livein + '\'' +
                ", politicalOutlook='" + politicalOutlook + '\'' +
                '}';
    }
}
